package com.hs.srm.admin.modules.inforecord.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.annotation.DictMapping;
import com.hs.srm.base.common.base.CloneableEntity;
import com.hs.srm.base.common.utils.DictDataUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@TableName("supply_good")
@ToString
public class SupplyGoodEntity implements Serializable, CloneableEntity<SupplyGoodEntity> {

    private static final long serialVersionUID = 1L;

    public SupplyGoodEntity() {
        super();
    }

    /**
     * 主键ID
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    @Excel(name = "主键ID", orderNum = "1")
    private java.lang.String pkId;

    /**
     * 物料号
     */
    @TableField("material_code")
    @Excel(name = "物料号", orderNum = "2")
    private String materialCode;

    /**
     * 物料组
     */
    @TableField("material_group")
    @Excel(name = "物料组", orderNum = "3")
    @DictMapping(type = DictDataUtil.DictType.WLZ)
    private String materialGroup;

    /**
     * SRM供应商编码
     */
    @TableField("srm_code")
    @Excel(name = "供应商", orderNum = "4")
    private String srmCode;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String vendorName;

    /**
     * 工厂
     */
    @TableField("werks")
    @Excel(name = "工厂", orderNum = "5")
    @DictMapping(type = DictDataUtil.DictType.GC)
    private String werks;

    /**
     * 采购组
     */
    @TableField("purchase_group")
    @Excel(name = "采购组", orderNum = "6")
    @DictMapping(type = DictDataUtil.DictType.CGZ)
    private String purchaseGroup;

    /**
     * 创建人
     */
    @TableField("createBy")
    @Excel(name = "创建人", orderNum = "7")
    private String createBy;
    /**
     * 采购组织
     */
    @TableField("purch_arg")
    @Excel(name = "采购组织", orderNum = "9")
    @DictMapping(type = DictDataUtil.DictType.CGZZ)
    private String purchArg;

    /**
     * 条件记录有效起始日
     */
    @TableField("start_data")
    @Excel(name = "有效开始日期", orderNum = "10")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date startData;

    /**
     * 物料描述
     */
    @TableField(exist = false)
    @Excel(name = "物料描述", orderNum = "8")
    private java.lang.String materialDesc;

    /**
     * 价格有效日结束时间
     */
    @TableField("price_end_data")
    @Excel(name = "有效截止日期", orderNum = "10")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date priceEndData;

    /**
     * 创建时间
     */
    @TableField("createtime")
    @Excel(name = "", orderNum = "12")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date createtime;

    /**
     * 是否传送SAP
     */
    @TableField("toSendSap")
    @Excel(name = "是否传送SAP", orderNum = "13")
    private Integer toSendSap;

    /**
     * 货源记录编号
     */
    @TableField("supply_num")
    @Excel(name = "货源记录编号", orderNum = "14")
    private Integer supplyNum;

    /**
     * 采购物料工厂
     */
    @TableField("purchase_werks")
    @Excel(name = "采购物料工厂", orderNum = "15")
    private String purchaseWerks;

    /**
     * 货源记录状态：0，未确认；1，已确认
     */
    @TableField("info_status")
    private Integer infoStatus;

    //原结束日期
    @TableField(exist = false)
    private java.util.Date oldEndData;

    @Override
    public SupplyGoodEntity clone() {
        try {
            return (SupplyGoodEntity) super.clone();
        } catch (CloneNotSupportedException ex) {
            // TODO Auto-generated catch block
            ex.printStackTrace();
        }
        return null;
    }
}
